<%
/*

Retrieves MDN compat data for a given feature

Parameters

$0 – A query string indicating for which feature to retrieve compat data for.
$1 – A depth setting indicating how deep sub features should be added to the table
(flattened, default: 1, first level of sub feature data will be included).

Example calls

{{compat("webextensions.api.alarms")}}
{{compat("webextensions.api.alarms.Alarm")}}
{{compat("webextensions.manifest")}}
{{compat("webextensions.manifest.applications")}}
{{compat("css.properties.background-attachment")}}
{{compat("css.selectors.any-link")}}
{{compat("css.at-rules.font-face")}}
{{compat("http.headers.Cache-Control")}}
{{compat("http.status.404")}}
{{compat("http.method.CONNECT")}}
{{compat("api.WebGL2RenderingContext")}}
{{compat("api.WebGL2RenderingContext.beginQuery")}}
{{compat("html.elements.input")}}

{{compat("html.elements.link", 2)}}
{{compat("webextensions.api.alarms", 3)}}

*/

var query = $0 || env['browser-compat'];
if (!query) {
  throw new Error("No first query argument or 'browser-compat' front-matter value passed");
}
var depth = $1 || 1;
var output = `<div class="bc-data" id="bcd:${query}" data-depth="${depth}">
  If you're able to see this, something went wrong on this page.
</div>`;
%>

<%-output%>
